#{extends '/template/main.html' /}
<style>

    img{cursor: pointer;}
    #pic{width: 500px; height: auto; overflow: hidden; background: #fff; position: fixed; display: none; z-index: 100; top:20px; right:20px; padding:10px;  box-shadow: 0px 0px 5px 0px hsla(0,0%,5%,0.3); }
    #pic1{width:100%; }

</style>
<div class="panel panel-default">
    <div class="panel-heading">
        <h3 class="panel-title">审核商户</h3>
        <div class="panel-options">
            <a href="#" data-toggle="panel">
                <span class="collapse-icon">&ndash;</span>
                <span class="expand-icon">+</span>
            </a>
        </div>
    </div>
    <div class="panel-body">

        <form method="POST" role="form" id="form" name="form" enctype="multipart/form-data" action="/BS0007/admin/merchant/update/${merchant.id}/${pageNumber}" class="form-horizontal validate">
        #{include 'manage/merchant/MerChantCtrl/form.html'/}
        </form>

    </div>
</div>

<!-- Imported styles on this page -->
<link rel="stylesheet" href="/public/js/wysihtml5/src/bootstrap-wysihtml5.css">
<link rel="stylesheet" href="/public/js/uikit/vendor/codemirror/codemirror.css">
<link rel="stylesheet" href="/public/js/uikit/uikit.css">
<link rel="stylesheet" href="/public/js/uikit/css/addons/uikit.almost-flat.addons.min.css">
<script src="/public/js/wysihtml5/lib/js/wysihtml5-0.3.0.js"></script>
<!-- Imported scripts on this page -->
<script src="/public/js/wysihtml5/src/bootstrap-wysihtml5.js"></script>
<script src="/public/js/uikit/vendor/codemirror/codemirror.js"></script>
<script src="/public/js/uikit/vendor/marked.js"></script>
<script src="/public/js/uikit/js/uikit.min.js"></script>
<script src="/public/js/uikit/js/addons/htmleditor.min.js"></script>
<script src="/public/js/ckeditor/ckeditor.js"></script>
<script src="/public/js/ckeditor/adapters/jquery.js"></script>

<!-- Imported scripts on this page -->
<script src="/public/js/jquery-validate/jquery.validate.min.js"></script>
<script src="/public/jquery/jquery.qrcode.min.js"></script>

<script type="text/javascript">

    $(function(){

        createQR();
        $(".hoverimg").hover(function(){
            $(this).append("<p id='pic'><img src='"+this.href+"' id='pic1'></p>");
            $(".idContainer a").mousemove(function(e){
                $("#pic").css({
                    "top":(e.pageY+2)+"px",
                    "left":(e.pageX+4)+"px"
                }).fadeIn("fast");
                // $("#pic").fadeIn("fast");
            });
        },function(){
            $("#pic").remove();
        });
    });
    var qrCodeBase = "${qrCodeBase}";
    function createQR() {
        $('#qrCode_id').html('');
        var url = qrCodeBase;
        console.log("qrCodeBase",qrCodeBase)
        $('#qrCode_id').html('');
        $('#qrCode_id').qrcode({width: 200, height: 150, correctLevel: 0, text: url});

    }



    var  pageNumber = '${pageNumber}';
    //商户审核
    function  subMer(status){
        var  msg = status == 'PASS' ? '通过' : (status == 'NOTPASS' ? '不通过' : '错误操作');

        layer.confirm('您确认审核'+msg+'？', {
            btn: ['确定','取消'] //按钮
        }, function(){
            var merchantId = $('#merchantId').val();
            window.location.href = "/BS0007/admin/merchant/auditMerchant/"+merchantId+"/"+status+"?pageNumber="+pageNumber;

        }, function(){
            layer.closeAll();
        });


    }
    $(document).ready(function() {
        // 提示
        var msg = '${flash.get("msg")}';
        if (msg) {
            saveSuccess(msg);
        }
    });
</script>